No finite set will do. If $f(y)$ is one such polynomial and $cy^m$ is a monomial occurring in it, then change this monomial to $cy^{m+q-1}$ for some power $q$ of $p$ such that your finite set is a subset of the field of $q$ elements. The two curves will go through the same finite set of points but will have different genera if $q$ is sufficiently large.
However, now the OP has decided to change the question.

