Permuting a collection of values