This code make grid of '1' in the arr[15,15] with center at 10,10.
int x = 10, y = 10;
int lConerX = x - 4, lConerY = y - 4;//coords of top-left conner
for (int i = lConerX; i < lConerX + 7; i++)
{
for (int j = lConerY; j < lConerY + 7; j++)
{
arr[i, j] = 1;
}
}