Having a callback variable with an index

I think I understand. You can return a structure variable. Give the function an ID and return a variable with as many children as you need. It could return any values in the provided parameters.

For you or for other readers.
https://wiki.gdevelop.io/gdevelop5/events/async/