A lot depends on your situation and what you have to work with and security issues. Since I've changed and added over the years I don't have the best layout but it works. If I was to design and build again?
I'd put my building for maximum sun exposure for the panels to be on the roof.
12 panels in 3 racks with a foot between and at each end so they could be cleaned and adjusted. 40' long X 7.5' deep minimum roof. My panels are about 40" X 65".
Make sure to have cable runs into your elect. room and a water facet near for cleaning the panels. You may want more roof area if you have a transformer or future use.
Slightly pitched so that water runs off one edge and can be collected in a cistern under most of the building, not under generator room.
Separate rooms, each with it's own door from the outside.
Inside measurements. (will not add up to roof and you should consider roof overhang and wall block size.)
Battery room 5' X 8' with upper and lower venting blocks on one wall, doors are not air tight at all. No more then 3 banks high for easy service. Run cables through interior wall into:
Electrical room. 5' X 8' should be more then enough for everything.
Water room. 5' X 8 with cistern access, filters, UV purifier, pump, expansion tank and valves.
Fuel tank room is optional. I have two 500 gallon tanks in an 10' X 8' room but with the solar I don't need nearly that and a 100 gallon tank can be hung on an outside wall if desired or in this room and used as a shortage/tool room.
Generator room. I have a 50 kw in an insulated "sound proof" room that L's off one end. About 15' X 10'. A much smaller generator would work just fine as long as it would have the auto-start that my inverter controls. Generator exhaust location should be considered. Auto transfer switch in here with timers and all sorts of other stuff to control Edenorte.
I also have outside lights to tell me things. White that I have Edenorte available. Green that tells my that the generator is running. Be sure to install a knife switch between the breaker and your inverter to bypass the inverter completely.
I've not sat and drawn this up so my measurements are all over the place using some of what I do have but would need to change sizes to get panels on the roof and have that roof overhang. But you get the idea.
Good luck and thanks for reading the thread. LOT's of good people with good ideas and knowledge.