Batteries on a boat need to be low down and strapped down. These things are heavy and if they decide to move about it seldom ends well.
Usually boxes were constructed out of plywood / fiberglass or Roto-molded plastic and these were used to contain the battery. The logic was that any spilled battery acid would be contained by the box.
While I haven't discounted using wet cell technology (e.g. Golf Cart 6V) I am more likely to install AGM batteries. I happen to believe that sealed, maintenance free batteries will be the standard in the future. For that reason I am installing a battery "tray" whose sole purpose is to secure the battery bank in place.
The yellow piece of cardboard is a generic battery outline whose dimensions are the max length of a Group 31 and the max width of a Trojan 6V. The tray can a accommodate 8 group 31 AGM batteries for a total of 840AH.
The spaces in between will be chocked with starboard pieces and the batteries held down by wooden battens bolted down to the edge of the tray with threaded bar.
This is the bracing on the bottom of the tray. It will be supported on wooden beams and bolted into the lead keel. It will also be braced fore and aft and side to side to prevent movement.