Randomizing arrays

lets say I have 2 arrays: one contains objects and another their x and y positions.

so if randomise the content of the first array, how could I apply the same randomization to the other array?

(so that I dont loose correlation)