Array2D to one dimension

This is a simple way to flat a two dimensional array in a linear one