A General Framework for the Kinetic Modelling of Polyatomic Gases