RE:Urban populationsOldnagger - that is a good question. I certainly don't have the all the answers to that question but as an example I will use the private company that I have invested in.
Their dispatchable electricity technology will have the capacity to provide power for 5000 homes from each installation and would be housed in a container the size of a construction waste bin. In your example it could be placed in a municipal park that has access to natural gas. Their technology is also capable of using other fuels such as biofuels and as such many containers could be placed near the community dump combined with a facility to trap the methane gas to produce the biofuel. The technology can also (with some modifications) ultimately use hydrogen as a fuel if this fuel actually becomes practical and it can also pass through electricity produced by solar panels to its customers.
There are also building materials already developed that can act as generators of solar electricity and so new homes constructed with such materials would have the capacity to produce electricity without requiring any additional space. House renovations could use this technology as well.
So in essence the answer is that there are new technologies being developed that will provide solutions to the question that you are asking.