You are making a temporary array. Changing its value implies changing a temporary variable.
I believe what you want is to change the value of the referenced variable, from a list. There’s lot of different ways to handle this, one I suggest is creating a struct with the Skill Name and a float value and declare an array (inside the class variables) containing each of the skills you want. Access the specific skill you want and set from a persistent variable, not a temporary one.
You can handle this in lots of manners, but keep in mind that you can’t store all of them in a temporary variable and access the specific index that you are NOT referencing the variable you passed to this array, it’s just a copy of the previous variable.