Add exportable function for generating integer range subpatterns (needs docstring)