Generalized frieze varieties and Gr\"obner bases