For which sets of primes $P$ is there a finite type $\mathbb{Z}$-algebra $A$ such that$$p\in P\iff\mathrm{Hom}(A, \mathbb{F}_p)=\emptyset?$$

$A=\mathbb{Z}/n$ works for the cofinite $P$.