I need to parameterize the script so that the numbers are used in order
You can use the range syntax to generate an array of in order numbers.
def countParam = 10000 def range = 1..countParam => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...]