new implementation of haskell array