Duplication in an array