A generalized pairwise modelling framework for network meta-analysis