Proper handling of arrays of non user-defined types