Adds support for arrays of 1d, 2d and derived types