> You can't wall all the fields but you can wall the village.
An interesting take on this is depicted in Attack on Titan, where they do in fact wall all the fields - the city (I don't remember if it's like the last vestige of humanity or whatever) is surrounded in concentric ring walls, the outer one which contains villages and farmland having a circumference of about 3000 kilometers for an internal area of 723,822 km², making its area just a bit smaller than Zambia and Chile.
Of course, a 3000 kilometer, 50 meter tall wall is ridiculous. But then again the great wall of China is 21.000 kilometers long. I believe there's more info about the walls and their construction in the source.