I can see this happening with a combination of a script in the Scripting app and a webhook-triggered automation. The script would do the heavy lifting of matching people and building groups. Once that’s done, it would call the webhook once per group to trigger the automation, which would send an email to the members of each group. For example, if there are 15 people, the script would build five groups of three, then call the webhook five times, each time sending data for a single group’s members to the automation to email those members.