It seems like you need a programmable voltage regulator. Well, if you don't like normal voltage regulators, then you may use a micro controller attached with a transistor working as a programmable voltage regulator with the supply to the IC. You can sense the input voltage and according to it's value, you can program the MCU with PWM techniques and finally with filtering, you can get desired output dynamically.
But still, you have to use regulated 5V (and not beyond or your MCU will go boom !!) for the MCU. But as MCUs use very low power, you may simply use a zener here.
Rocket scientist