A unified approach to different generalizations of $\infty$-category theory