further thoughts:
- 24V supply rather than 12V
- either 3 strings of 7 LEDs or 4 strings of 6 LEDs depending on Vf specs
- each string PWM'd with a small MOSFET, keeping input capacitance and gate threshold low
- probably STM32F103C8 at 24MHz
- average current sensing feedback through shunt resistor with opamp and RC low pass
that particular STM32 model is cheap due to huge volume production and it's used in Blue Pill so plenty of libraries around.