Implement flat array option

Flat arrays implement multi-dimensional arrays using 1D native arrays
and index computation. This is required for languages that allow the
same array to be accessed using different dimensions.