In this work we study evaluation codes defined on the points of a subset \(\mathcal {X}\) of an affine space over a finite field, whose vanishing ideal admits a Gröbner basis of a certain type, which occurs for subsets considered in several well-known examples of evaluation codes, like Reed-Solomon codes, Reed-Muller codes and affine cartesian codes. We determine properties of the polynomials in this basis which allow the determination of the footprint of the vanishing ideal and the explicit construction of indicator functions for the points of \(\mathcal {X}\) . We then consider generalized monomial evaluation codes and find information on their duals, and the dimension of their hulls. We present several examples of applications of the results we found.