Walk to random waypoint

My char. is walking along a set path of waypoints right now. I am trying to make him walk to a random waypoint instead. Anyone know of a solution? Perhaps assign a random.range index for the waypoints? I cant figure it out how to do it.

// ... increment the wayPointIndex.
				if(wayPointIndex == patrolWayPoints.Length - 1)
					wayPointIndex = 0;

				else
					wayPointIndex++;
			
				// Reset the timer.
				patrolTimer = 0;
			}
		}
		else
			// If not near a destination, reset the timer.
			patrolTimer = 0;

		// Set the destination to the patrolWayPoint.
		nav.destination = patrolWayPoints[wayPointIndex].position;
	}

Replace:

if(wayPointIndex == patrolWayPoints.Length - 1)
     wayPointIndex = 0;

else
     wayPointIndex++;

with:

wayPointIndex = Random.Range(0, patrolWayPoints.Length);