After further research, it seems like I can accomplish this with pointers.
Declare globally a pointer to a vector, and inside the callback call the required methods eg. vector->push_back(x)
In main, create the vector object and assign its address to the global pointer, and attach your callbacks as needed.