Managed to store the input values into an array everytime the information changes