Creates a character set from chars.
The iterable is consumed once and stored as a string for indexed access during generation.