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

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