Planting vertically

When growing sideways isn't an option, try going upwards: hydroponic growing trays can be piled on top of one another, and plants can be grown more closely next to each than in the soil, making it very efficient in terms of space. As for what kind of space they can grow in, the sky is the limit: with no need for scarce farmland, one possibility could be to have hydroponic farms in skyscrapers.