proper handling of arrays of unknown types