Internal overhaul in order to support arrays.

1D arrays of any class supported by Compound are now supported, as well
as 2D primitive arrays.