rough support for accesing 2D arrays by index