Transposing a 2d array.