Off the top of my head, without uncrimping and re=crimping the bottles (which just needs a press and a die)...
Spray cans have a valve, it's not a one-way system. If you want to refill one you just need a mechanism that seals against and activates the valve, and then to have your order of operations correct for a filling process.
Think of refilling a butane ligher: you take a can of butane, press the valve stem against the lighter's seal, and wait for the pressure to equalize between them.
Doing the inverse you could pressurize the spraybottle (usually with N2 or CO2 though some volatile solvents like propane could work) and then press the valve against a higher-pressure container filled with your (hopefully properly diluted) paint mixture to fill a charge. A bike pump at the top of a jar and a drilled/tapped/sealed standard butane valve would technically work for low-volume production.
Keep in mind you'd have to empty the existing charge as much as possible first, and preferably "clean out" the trash that's left over with a few cycles or solvent fill/release using that above method to minimize contamination.
You'd also have to keep in mind the materials of the container and how they would interact, since a lot of paint thinners will dissolve certain plastics like those used in the "straw" of aerosol cans not intended for those solvents.
It'd be a good idea to figure out a method of introducing an agitator into the can since pigment/solvent likes to separate when left idle(this is why there's a metal ball in spray cans for you to rattle around between uses).
~You'd also have to properly re-label the can with WHMIS info to follow the average laws~