Javascript library for managing 2D arrays