You could use the following in the groovy [step 2]
def totalPostSteps = 8
def totalFromResponse = 7 //map the one you got from prev response
def postIdArray = new int[totalPostSteps]
def index = 0
1.upto (totalPostSteps,
{
postIdArray[index]+=1;
index = index==totalFromResponse-1?0:index+1
})
//log.info postIdArray.toString()
postIdArray.eachWithIndex{num, idx ->
def numString = num!=0?num.toString():""
//The next step will create/update properties in TestCase custom properties and u can map these directly to your POST requests
//OR You can set these directly to step3 and continue with step 4
testRunner.testCase.setPropertyValue("IdForPost_"+(idx+1), numString)
}