How would I create a dynamic context for rules?

This is not something included in OH core for this… and there shouldn’t be. You will need to develop something on your own. I highly recommend not using the legacy rules DSL for this, but use scripted automation. Here is something that I built using Jython, but similar things could be built into their own add-ons (coming soon)…

For playing announcements on speakers in areas that are occupied, where would the announcement play if there were more than one person in the house? You could try playing just in occupied rooms, but in my experience it is better to just play on all speakers, unless a flag has been set to disable the notifications in an area. I don’t recall if the amazonechocontrol binding allows you to play to a group of Alexa devices, but this may be an option. Otherwise, play on all of them. IMO, multiroom audio is one of those “next level” type of things for home automation. I use 9 old Sony SA-NS400s (500s too) that use Homeshare to group speakers together into “parties”. They support UPnP, so when there is an announcement, I start a whole house party for speakers in area that are not silenced. For holidays, I also send sounds to the speaker in an area when it becomes active/inactive. For example, it is near Halloween, so when a motion sensor or door sensor changes state, the speaker in that area plays a random spooky sound, but only during certain times of the day. It can be a little startling at times… especially for guests!