generate a random permutation of the elemetns of a list