An H Bridge part easily to switch polarity. You alternate turning on diagonal fets.
Eg, Q1 Q2 on Q3 Q4 off, then Q3 Q4 on, Q1 Q2 off. Alternating.....
Popular part is L298. Yiou can get it in modules (ebay, banggood, amazon)-
You need a clock to switch it, I am sure you can find a module with L298 on it and a PWM
control of it, eq a pot or V control to control brightness as well.
Most of the applications use an Arduino board to create the PWM signal to the board, and a dir signal
for polarity which can be a clock signal to reverse the polarity you are seeking. Or use a dual 555 timer
board, one for the PWM signal, the other to switch the direction (polarity) control of the L298 module.
Using Arduino using mBlock to program it. This converts your block configuration to code and
programs Arduino.
Note you could possibly tie the PWM signal high, full brightness, and just clock the DIR pin (polarity)
to do the design.
The L298 is a dual H bridge so do 2 strings.....a possibility. Its rated for 35V and 2A in a single bridge,
1 A each bridge is using both internal bridges. 25W total.
Regards, Dana.