A for-loop's body has no such restrictions, it can access any number of neighbor elements if the algorithm so requires.
a[i] = a[i-1] * a[i+1]
Reply on news.ycombinator.com