How to draw an object 3D with a Vector3's array

Hello, I would like to know how I can draw a three-dimensional polygon from an array of Vector3.
My idea was to use the Shape() function and then the ExtrudeGeometry() function, but Shape() does not accept vector3 but only vector2.
Is there any way to create a line that connects all these points, then fill the area of the drawn perimeter, and then do the extrusion?

How do you come up with an array of 3D vectors in the first place?

TBH, it’s uncommon to have 3D points for 2D shape definitions. I’m not aware of a solution for your problem. It’s best if you start with 2D coordinates right from the beginning (so your shapes lie in the XY plane).

Thanks for reply.
I get with an http call an array of points with xyz coordinates, where the first point and the last one are equal (the line joining them is closed).
For arrays of points that have at least one constant coordinate I can do it with mesh.position and mesh.rotate, but for arrays of points that have no constant coordinate I don’t know how to do it.