var arr = new bool[100][];
var contour = new List<List<int>>();
for (var y = 0; y < 100; y++)
{
var firstX = Array.IndexOf(arr[y], true);
var lastX = Array.LastIndexOf(arr[y], true);
if(firstX != -1)
contour.Add(new List<int> { firstX, y });
if (lastX != -1)
contour.Add(new List<int> { lastX, y });
}