How to change an array element

I have an WS2812 LED strip on tasmota and each pixel represents some HA status - eg whether a person is Home or whether the ‘Door Open’ group is On or whether it’s going to rain today etc

It all works well with a script that accepts a pixel number and hex colour, and sends that to tasmota with MQTT.

However I want the LED colours to be shown on the dashboard with a text description, so when the script sends x0000BB to pixel 3, I want an array to store x0000BB in its 3rd element, eg:

array[3]=x0000BB

or, using the variables within the script

array[espLedNbr] = espLedCol

Then the dashboard can show something like:
“led1 - john home” array[0]
“led2 - going to rain today” array[1]
“led3 - a security door is open” array[2]

I haven’t seen a way to setup an array with 20 elements, with the ability to change an individual element.

Can someone suggest where I look?

Thanks