I try to have verticle support approx every 4 feet but you really want to be able to remove a tank if necessary so lay it out so none are behind a support leg. Here in CA all the manufactured framed small glass tanks ( 15,20,20L, 25T & 29 )are a uniform 12.5" wide so I allow 42" between supports ( 4 tanks). 10 gallon tanks are more like 10.25" but much lighter so you can give it 51.5" and get 5 tanks between supports. If you need a longer span to pass over a large sump or something just go to 2X6. The whole thing should be attached to a wall at the back for sheer strength, if you can't do that you might consider using some plywood panels for sheer across the back or take the verticles right up to the ceiling and attach them to the joists above.
Industrial racking like Dman used would take years to rust through enough to challenge it's strenght but I'd think it would get pretty nasty unless you were diligent about cleaning. What say you Dman? That is exactly what I used in St Thomas, my whole shop was done in pallet racking and I had my office (loft) built on top of it. Very strong stuff. I used 2x4" & plywood for the shelfs I put tanks on so very litte SW got to the metal uprights.
On painting: SW does not rot wood, it actually preserves it. Fresh water is the problem with unpainted/ sealed wood, not salt. How many old wooden boats have you seen? It's rain water in the bilge that causes rot, not seawater.
Exception: Plywood is another story, over time moisture will cause it to delaminate, fresh or salt, doesn't matter.