Simplifying arrays