Iterating through an array and staying within bounds
You can use % remainder operator to be sure the value will be within bounds:

if (directionMoved == MoveDirection.Left) currentPageIndex--;
if (directionMoved == MoveDirection.Right) currentPageIndex++;

currentPageIndex += objectArray.Length;
currentPageIndex %= objectArray.Length;


This wiil allow you iterate in a circular way between 0 and objectArray.Length - 1.