Generate range from a set of numbers