This is not a solution, I’m just thinking out loud…
I guess the main issue here, there is not enough information if you just “supply” an array of the points, because there are many polygons you can create e.g.:
So, You may need to determine other “restrictions” to define the “connection order” of points…
Perhaps if you explain more details about what do you mean by:
If Is these polygons are already a Faces in your model. Or In other words, do you have faces already in a model, what you want to merge and remove the edges?
Then perhaps you can use this method:
or simplified version here:
Or if you share more information what you are doing and what you want to achieve…
…we may be able to give you more ideas…