Add range functions for enums and ints