Block swap the given array