Yep.
All prime numbers above 6 are of the form 6n + 1 or 6n + 5, everything else is a factor of 2 or 3. If you make a choice that occurs on primes then no choice will be made for the 6n + 2/3/4 cells. This gives a well defined pattern since this is setup so those no choice cells are the ones that could go outside the bounds.
You could also create a shape with 30 sides and a similar pattern since all primes above 30 (235) are of the form 30n + 1, 30n + 7, 30n + 11, 30n + 13, 30n + 17, 30n + 19, 30n + 23 or 30n + 29. Everything else is divisible by 2, 3 or 5.
In fact you can do this sort of thing with any set of factors. There will be regular gaps in primality. Set the starting point so that those gaps in primality only change the direction on the inward sides and you'll confine all numbers within some larger shape.