I have a list which is having around 2000 items in which there are around 1500 items are in closed status, now i would like to set different permissions for all closed items.
in your workflow history, is the "set item permission" action executed?
If not, your collection may not be populated and you should look at the query list action.
In this case, in your foreach loop, add a query list action
Where ID = WFVaribable:ItemID
Field "Created By"
store in a new variable and use this instead of the Initiator when setting permissions