Added support for arrays in type conversion.

Note: Arrays of primitives are not supported at the moment.