Change feature plane based of a input during opperation

I have two different areas in my cobot application that require the same code.

I was thinking it would be nice to have that chunk of code referenced to one feature and then change it to another feature when required. Therefore I can cut back on a massive chunk of repetitive code and perform the same set of actions in different areas.

But I cannot think of a way to overwrite a feature or create one as a pose and link it to a move L/J.

Any ideas / opinions?