This is definitely not reasonably possible right now. Perhaps you can do something extremely intricate with space script, but I wouldn’t recommend it.
This is an interesting use case though, and will take it into account as I explore some ideas in the Space Lua space.
Let me throw in some conceptual ideas. Not happy with them, but interested in feedback. Let’s say that we introduce the concept of a “page variable”, let’s say (although we could also just use front matter for this):
It feels unnecessary to go with a specific section for it, a subsection of the frontmatter would be more suited for it.
I was thinking more of something self contained within live query/template. However, the general workflow you describe seems well thought out. What I like about it, is that it can mostly be done already with space-script except using a push button (command link) instead of a drop down. So we’re only missing the drop down…
It seems adding the ability to create drop down menu that handles the selection of a variable and trigger a function on selection would allow lots of flexibility and is likely to bring other use cases.