One thing Jenny Chase (longtime solar analyst with Bloomberg) likes to point out is that in many places, solar panels are actually cheaper than fencing materials [1]
1. https://www.ted.com/talks/jenny_chase_solar_energy_is_even_c...
1. https://www.ted.com/talks/jenny_chase_solar_energy_is_even_c...
I'm not sure what a quarter-mile of solar panels four feet high would cost, or whether they'd survive the occasional cow rubbing on them. Neat idea, though.