For 3V, you'll find these, the replacements come in NiMh with the same form factor. There are also smaller 3V packs for the 3V boards.
The early 5V boards and older Protosound 1 boards take 9V batteries.
If you find one of these in your locomotive, I suggest you replace it immediately!