Randomize array

how can you randomize the results of an array in a for loop?

I am loading data in via xml and when doing a for loop to iterate through instead of showing 0, 1, 2, 3, 4 ect… how can i randomize for * ? If i do it in the for loop it keeps doing the randomizing and gets stuck and if after things are already loaded. how is it done?