can you make a generic smart charger?
It's not too hard to design, as a computer controlled switchmode power supply. But it will be more expensive than just buying one of each kind of charger, and if you want to deliver 15V @10A (for charging the car battery) it will be quite bulky.

The key issue is that switchmode devices control output power by varying the pulse width. If you have 100% duty cycle corresponding to 150W (for the car battery) then the &lt;1W for the AAA battery will be &lt;1% duty cycle: a series of very narrow pulses widely spaced. That's bad for precision.

Then there's the safety issue. If you configure it for 12V @ 10A and plug it into the 1.2V AAA battery you'll have a nasty fire on your hands.

Charging just 3.6V (phone, 18650 cells) and Nicad/NiMH is a more reasonable prospect. Don't forget to build battery simulators for the three types before testing with actual batteries, so the inevitable bug in the design doesn't do damage.