Ok so I tried checking the array using the console and it looks like the values just aren't being saved. I set the value of the array to A but the console displayed 0.
Just to see if I could reproduce the error I made a program with just a textbox, array, text, and a button. When the user pushes the button the value in the textbox is put into the array and displayed on screen. This worked totally fine so there must be something else wrong with my coding although I have no idea what it is