Totally Walled-Off Groups

You can make specific categories accessible to individual groups, but you can’t prevent members of group A from seeing members of groups B and C listed in /users or messaging them specifically.

PMs can be disabled site-wide though.

Your use case is too ambiguous to really make a recommendation, you’ve not said who these users are, if they’re coming from a different system, or anything really.