I am not sure why you are confused.
If unit receives bonus from cover is squad thing. IS section will get bonuses even if there flanked or fighing in point blank range.
This completely different from a weapon firing to certain target and doing "accuracy" and "damage" checks and applying the appropriate modifiers.
A fence's armor would effect the damage that fence would receive and not the unit behind it.
I think YOU are confused, my friend.
Is it or is it not true that some models of a squad can be in cover and some not?
Is it or is it not true that the damage dealt to said model is based on data which is coded to the WEAPON, and not the cover itself?
What I am proposing is not to give a squad a bonus based on the cover that it's in. I am proposing an approximation of that, represented by an equation which takes into account the penetration of a weapon and the "armor" of a piece of cover.
For example, and please correct me if I'm wrong, within the flamethrower's code is contained how much damage or accuracy it will do against a specific type of cover. This is what I understood from the modding tools.
My idea is simply this:
Green cover can be separated into a few different kinds, depending on the material.
For example,
whereas there is one variable for green cover as it is now, perhaps there could be "green_cover_stone" and "green_cover_steel" etc.
And the RA modifiers against these cover types could (possibly) be represented by an equation which takes into account the specific weapon's penetration.
For example:
green_cover_stone RA modifier = ".5*(pen\1.1)
green_cover_steel RA modifier = ".5*(pen\1.3)
Where "pen" is a variable that calls upon the current weapon's penetration value at that range.
It isn't "armor" per se, but I think it might approximate it.