Accessing array value for Post request XML

I have to run several Post requests in Postman using XML format. I have to run same function for several ID’s. So i use variables. If i use variable id1, id2 the request looks like this:

If the id’s are saved in an array and the values can be found in id[0], id[2] etc. The request does not work like this:

What is the correct way to write the request using a variable stored in an array?

@ywa Could you share more details about whether or not the IDs are static or dynamic?