It's hard to make sense of your code without seeing the project file and the structure of txt file with questions.
If you need a randomized array, you can initially set array width to 0. Then read a new question from AJAX and insert it at index int(random(array.width+1))
Or you can load all questions into the array at Y=1, put random values into Y=0 and then use "array sort".
Or load all questions into temp array, then pick a random element, push it into another array and remove from the temp array. Repeat until all questions are transferred.