A (dis)continuous finite element model for generalized 2D vorticity dynamics