update array data structure to use Data.Array