UPDATE: I added another set of files for people who have pegboards with 1/4" holes.
This will hold and dispense at least 16 AA batteries and is meant to be used on a pegboard.
My pegboard's holes are just about 1 inch (25.3 mm) apart, and are roughly 4.6 mm in diameter.
Print two pins and one of each side. Assemble on pegboard. This one is slightly more difficult to push the pins into than the AAA one but it's not too bad.