I have two batteries of similar size to the truck's originals, in my toolbox. Under the hood, I have a continuous duty solenoid, similar, I presume, to the Tekonsha one mentioned above. I got it at an air conditioning repair shop. Looks very similar to a Ford starter solenoid, but for CONTINUOUS duty. When the solenoid is activated, it joins a battery cable from the positive side of the truck battery closest to the alternator with a heavy (#4-0 ?) that runs to the positive terminals of the ones in my toolbox, and goes on to a quick plug at the rear bumper. The solenoid's activator terminal is wired to a switch on my dash. That switch is 3 position... The normal position is UP, which activates the solenoid when the ignition is on, so I routinely run on and charge all four batteries. The CENTER position is off, and the batteries are in no way connected to the other batteries. They are electrically equivalent to sitting on the tailgate, unconnected. The DOWN position activates the solenoid, regardless of the ignition.
With this setup, the spare batteries are always charged, and at the same voltage as the truck's batteries, and are (with the switch in the CENTER position, available for jumping another vehicle without endangering any of my truck's electronics, or, plugging in a cable I made that goes to the 5'er and activates a relay to disconnect the trailer's batteries and connect the ones in my toolbox to the triler's system instead. I don't often do that, but it IS available.
Of course, in my toolbox, I have appropriaate ventilation holes such that the hydrogen generated doesn't gather. . Some holes high in the back and some in the bottom. .
Some may not like this setup as if I use the ones in the toolbox and run them down too far, hooking them to the truck's batteries while recharging might give uneven charging... I am not too sure on this...