Added test for populated arrays and inverted