reorder arr with only 0,1,2