There are two different ways to produce a voltage source. The first is to put a variable resistor in series with the power source, which you can adjust to control the voltage. This works, but dissipates a lot of heat. The second is to put a switch in series with the power source and a capacitor in parallel with the load, then switch the power source on and off very rapidly and use the duty cycle to control the voltage. This is how modern switching power supplies work. In actual practice, there are also inductors in the circuit which cause resonance, and allow the switching to happen when there is no current flowing through the switch. This is how modern switching power supplies can be so efficient.
Ok, thanks. But I was calling attention to a point in the previous comment that makes it difficult to see a kind of "dualism" between idealized current sources to idealized voltage sources. Idealized current or voltage sources don't necessarily have any series resistance, and it doesn't matter how they're realized.
I'm certainly no electrical engineer, and I see how the nice duality was lost in my description.
Yes, I was thinking about the ones I'd actually worked with, where the resistance was the control knob. I haven't done much electronics since, so my recollection isn't perfect. I have recently been doing some esp-32 control projects where I just used some power supply I bought. I should look into how it works!
Edit- I just looked up switching power supplies and remembered that I did actually know about those!