writing tests for the flattening and reshaping of arrays