Add support for 2D arrays

Fixes #1