Outside of geographic separation, not really. The rest is down to interest and compatability when organizing an outing or something of the sort.
From very early on, I considered work acquaintances just that and not more. If I socialize with colleagues, there's little or no instersection of circles of people outside work.
Friends sort themselves out to a large extent. You meet someone and become acquainted over time with tehir freinds and they with yours. Some people make the jump and land with a foot firmly in both places; for other people it's a more tentative footing.
When I was younger I thought, as young people often do, that my circles of friends would grow in all directions and I would add friends of all sorts and to all circles and it would be one more or less ever growing mass. And then I would die and have a huge funeral in a huge hall, or somehing like that.
I did have a few big mash-up parties with people from disparate circles thrown together, and they came off well. Still, this inclination to mix them all up faded even as the number of friends and number of friend circles diminished.
It's admirable, though, those people who have, say, a fantastic and even famous New Year's Eve party every year, with hundreds of guests, and guests of guests -- such a big thing, such an institution that, an ocean away, you can meet someone who went to the same parties, maybe the same years as you, maybe years before or after. That's a real talent to pull off and the best of them seem to be a sort of family institution, or someone like a college professor who has a big annual party with collegeagues, family, past students, neighbors, and all sorts thrown together in a real mix but somehow it works and everyone loves to be invited again.
I'm in my 60s and now have a good many firends. The local ones are more or less one big sprawling group with a lot of subsets, but they tend to mix well. If you are doing something in the afternoon with one friend you might invite him to something you are doing that night with a group of friends he doesn't now or doesn't know well, and that always seems to come off happily. Other friends (and most of my oldest friends fit this bill) are at such distance that we see other only when our travels intersect or when we organize an activity to come together.
But compartmentalize? No. That's something I thought I both had to do and had to work against when I was young. Now it seems silly to invest any effort in that.