Where does this electrical box go?

That voltage regulator is part of the OEM charging system, Which may prove to be inadequate where modern electronic ignition is employed. Crossing that bridge if/when is pretty much the norm'.
Good luck with it.