Takes an array and returns its elements as separate real or complex numbers. Also returns a list of the dimensions of the array.