how to connect and triangulate drawlines?

How can I sequentially connect a list of objects within an array?
I have 12 objects (it is not a fixed amount), and I would like to connect the first (Length [0]) with the next (1), and the 1 with the next (2), and then return to [0] to form a triangle . and so with the others, (2-> 3, 3> 0 - 3-> 4, 4-> 0) and so on.

it had occurred to me to create a script for each object, and that object is connect with the previous one and with the 0. but unfortunately, the current int in which the script is not recognized.

I have a script with a list of objects (gameobject ), what I would like to know is how I identify in another script, what the object number is.
if the script is inside object 4, that the “current” int to recognize that object, is the value of the object (4), among 150 more objects.

any ideas?

Have a look at the Mesh class documentation. It features everything you need.