**First of all** - a number must not occur twice, that is implied since we're talking about permutations. So filling the table with a simple random(255) function won't work. **Secondly**, you need to ensure that there are no premature recurrence patterns: Consider the values 1,2,3,4 - the permutation table 4,3,2,1 is not a very good one because recurrence happens immediately, i.e. 1 -> 4, 4 -> 1. Likewise with 4,2,3,1 or 1,2,3,4. The optimal tables take you all the way through all positions: 3,1,4,2 or 2,4,1,3. This property becomes increasingly important as you increase the number of dimensions and perform recursive lookups. **Thirdly**, For larger tables like one with 256 values you need to ensure a uniform random distribution, so you may want to constrain the random step distance to a certain min and max range, e.g. 5..120 or something. These numbers are worth experimenting with.