On certain generalizations of twisted affine Lie algebras and quasimodules for $\Gamma$-vertex algebras