In place rearrangement of data array, as directed by index array a