This fixes a bug that cgtest56 exposed, where an array of a user-defined type
that was itself an array wound up being an array of arrays rather than a single
array.
As part of this, makeArrayType is now called addDimensions, and takes a list of
dimensions to add rather than just one.