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?$$Do all the finite $P$ arise this way? $A=\mathbb{Z}/n$ works for the cofinite $P$.