How to use ESPHome global variable arrays in Lambda light calls

I’ve really been struggling with lambda and cannot find an answer for this. How can I use a global array as the color values within a light call, something like this:

globals:
  - id: rgbww_array
    type: float[6]
    initial_value: '{0.0, 0.0, 0.0, 0.0, 1.0, 0.0}'

button:
  - platform: template
    name: "test"
    on_press:
      then:
        - lambda: |-                  
            auto call = id(light_1).turn_on();
              call.set_brightness(rgbww_array[0]);
              call.set_red(rgbww_array[1]);
              call.set_green(rgbww_array[2]);
              call.set_blue(rgbww_array[3]);
              call.set_cold_white(rgbww_array[4]);          
              call.set_warm_white(rgbww_array[5]);
              call.set_save(false);
              call.perform();

thank you in advanced

Have you tried:

              call.set_brightness(id(rgbww_array[0]));

Embarrassingly, I had id() in my .yaml but my code wasn’t working so I changed it to a different non-array global. When I copied my code to the post I realized I still had the other global and I was in a hurry so I hastily typed out rgbww_array[0] and copied to the other calls. Turns out I had a formatting issue elsewhere that was causing the problem. The correct syntax is call.set_brightness(id(rgbww_array)[5]); if anyone cares.