If storage makes sense (if a consumer for the electricity can't be found), battery storage (or flywheel storage) will almost certainly be kept on the wayside and not on trains; that way you don't have to care about weight / volume / heat dissipation concerns. SEPTA has such a system -- a large battery array at a station that captures regenerative braking energy.