Absolutely! Enumerating the neighbors of an element of a list by definition requires bounds checking. It's not more elegant to instead do some extra additions with numbers known to be 0 at compile time.
Represent the question faithfully first, then optimize later maybe sometimes.