From initial view, we might need a couple of things to be in place.
Api to support list of users.
Autocomplete component to search for user to share the modal with.
Since the lookup is done with sharable groups, users should be able to edit and view the respective groups. We might need to introduce RLS to support only by creator workflow, but that is not part of the discussion yet.
Allow free search and multiple values in autocomplete groups.
If the user is no longer available, it chip should be layered with a red hue or color to denote such instance.
If the user is unavailable, disable update / save button so that the users can rectify the mistake before proceeding.