make SUM support multi dimensional arrays

As of now, `SUM(A1:A3)` could be translated as `SUM([A1, A2, A3])` and that works, but if you SUM a range that spreads for multiple lines and columns, like `SUM(A1:B3)`, that would be translated to `SUM([[A1,B1], [A2, B2], [A3, B3]])` and that wouldn't work.

This PR makes that work.