How to represent a 2d array integers in Haskell so that I can access any element with (i, j) in O(1) or O(logN)?

What's the difference between defining with Data.Array and Data.Vector? Which one is more practical

```
data Matrix = Vector (Vector Int)

```

If I define as the above, how to make a function that transposes this Matrix?

For instance: transposing a `[[1,2,3],[4,5,6],[7,8,9]]` would return `[[1,4,7],[2,5,8],[3,6,9]]`