An Arduinoless, No specific use, No specific stm32 chip, No weird-ass library abstractions C HAL based DUMB guide to:
Set the number of pixels, load the RGB array, shoot the data out the pwm.
Its just you, me, any stm32 chip with DMA + PWM, and a cup of lemon ginger tea.