ActivityPub make it easy to reason about.
Groups are a type of Actor. It gets an inbox. Membership is obtained by subscribing. Notes are sent as Mention activities to its inbox and redistributed to its members by the Group instance.
There you go, public groups.
Private groups would need more work to manage membership but public groups are a start.
@Alda One could theoretically write a bot that does that with a user account
Home sweet home.