You just need to create an array of objects - you can't create an instance of Monitor
; it's a static class. (I'm surprised you can even declare the array - although it's not clear why you've decided to use fixed sized buffers, either. Stick with safe code, I suggest.)
So:
object[] forks = new object[5];
for (int i = 0; i < forks.Length; i++)
{
forks[i] = new object();
}
Then you can use:
Monitor.Enter(forks[x]);
to acquire the monitor for the index x
.