How to clip a component based on another components variable?

I’m designing an avatar creator system. I have a component with several different variables (a head, with different head shapes.) I want to give facial hair options, but I want to make sure that they are masked/clipped based on the head shape. I want to avoid having to create a variable for every possible head shape. So is there a way I can have a component be clipped by another component based on their variable?