Thanks so much for your responses, and apologies for not replying sooner-- I’ve been busy with holiday and family stuff and am getting back into things now.
This information is extremely helpful (especially the background info provided by @Greyelf) and exactly what I was looking for: I’ll definitely be able to implement the kind of functionality I was hoping was possible. I’ll post my final implementation when I’m finished in case anyone in the future might find it helpful.
Cheers and thanks again everyone!