I am trying to convert the data read from my CSV file into an array but for some reason when the function is finished it also clears the array. I can see that whilst the functio