Player Area of Effect

How would I go about giving a player an area of effect bonus with a data pack? Example: One group of players would have a regeneration effect to anyone within 3 blocks radius of them.
Continue to help post