Randomize the array. Then select a sorting algorithm, hit sort, and watch the magic happen. More info on sorting algorithms here.