can someone invent us a magic box?

Hi, I haven't found this specific discussion and I apologize if it's already been addressed as I imagine it has...
Does this "Magic" box exist or does anyone know how to build one?
Concept:
-take an assortment of random old, new, different chemistry, different voltage etc.
-wire them each into the magic box
-The box then "reads" the batteries, and charges them accordingly. (stopping before over charge)
-The box or another box will then pull power from each battery at an appropriate rate and disconnect before the battery is too low.
I am not an expert (this is probably obvious) I just would imagine that this magic box would be possible to build and I'm sure I'm missing something as to why it is not.
-The charging of the batteries seems possible through essentially small chargers for each battery,
-there's most likely an economical way to do this?
-The main problem I see would be pulling power,
-say you want to pull a big load, the batteries would be switching a lot as one would imagine some very crappy batteries in the mix would quickly discharge,
-the power could be "cleaned" with a capacitors bank?
PLEASE invent this! haha! Or if anyone actually knows how to build this system economically let me know and I want to do it!
otherwise do I just throw away all my random mostly functioning lead batteries and purchase lithium batterys? Wish I could just save them though
Does this "Magic" box exist or does anyone know how to build one?
Concept:
-take an assortment of random old, new, different chemistry, different voltage etc.
-wire them each into the magic box
-The box then "reads" the batteries, and charges them accordingly. (stopping before over charge)
-The box or another box will then pull power from each battery at an appropriate rate and disconnect before the battery is too low.
I am not an expert (this is probably obvious) I just would imagine that this magic box would be possible to build and I'm sure I'm missing something as to why it is not.
-The charging of the batteries seems possible through essentially small chargers for each battery,
-there's most likely an economical way to do this?
-The main problem I see would be pulling power,
-say you want to pull a big load, the batteries would be switching a lot as one would imagine some very crappy batteries in the mix would quickly discharge,
-the power could be "cleaned" with a capacitors bank?
PLEASE invent this! haha! Or if anyone actually knows how to build this system economically let me know and I want to do it!
otherwise do I just throw away all my random mostly functioning lead batteries and purchase lithium batterys? Wish I could just save them though

Comments
I am available for custom hardware/firmware development
https://www.victronenergy.com/battery-isolators-and-combiners/cyrix-battery-combiners