Can this be the solution?

Code:
void main()
{
  for(int cnt = 0; cnt < 5; ++cnt)
  {
    OutVar[cnt] = Arr[(i+1)%5] *Arr[(i+2)%5]*Arr[(i+3)%5]*Arr[(i+4)%5];
  }
}