Hey this I likely impossible.
Imagine I have gates: A, B and, C
I want to have three keys that open: A, A+B, A+C.
This will allow villagers to have one key that opens their own area and the main area but not other people's areas.
I think i know the answer to this which is making multiple locks and have a key ring. was just wondering if it was possible.