How to create a mesh with coordinates given from an Arduino?

Hello guys,
I would like to build a Laserscanner with Arduino, which gives me the coordinates of the scanned object.
Then I need to create the Mesh/Modell for this particular object (This isn’t the problem; Hardware already works fine). In the script down below you can find a simulation of this process.
So my question is: How can I create a mesh/modell in Unity with those coordinates as vertices of the mesh/modell?
It would be really nice if someone could help me, because this project is very important to me.

Arduino code: (sorry it’s in german)

int abstand = 0;
int rotXY = 0;
int rotZ = 0;

void setup()
{
    Serial.begin(9600);
}

void loop()
{


    for (int i = 0; i < 200; i++) {   //200 = Steps für eine Umdrehung (Verdoppel und Vervierfachbar) i = Sensor Hoch und Runter
      for (int j = 0; j < 200; j++) {
        abstand = random(0, 1023); //0-1023 entspricht 4-30 cm j = Drehteller
        rotXY = j;
        rotZ = i;


      String erg = "";
      erg.concat(abstand);
      erg.concat("|");
      erg.concat(rotXY);
      erg.concat("|");
      erg.concat(rotZ);
      Serial.println(erg); 
      delay(100);
      }
    }
      delay(5000);
}

Unity code: (sorry it’s in Spanish)

 SerialPort stream = new SerialPort("COM3", 9600);
    public string receivedstring;
    public GameObject carrito;
    public Vector3 rot;
    public Vector3 rot2;
    public string[] datos;
    public string[] datos_recibidos;


    void Start()
    {
        stream.Open(); //Open the Serial Stream.
    }

    void Update()
    {
        receivedstring = stream.ReadLine(); //Read the information
        stream.BaseStream.Flush(); //Clear the serial information so we assure we get new information.

        string[] datos = receivedstring.Split(','); //My arduino script returns a 3 part value (IE: 12,30,18)
        if (datos[0] != "" && datos[1] != "" && datos[2] != "") //Check if all values are recieved
        {
            datos_recibidos [0] = datos[0];
            datos_recibidos[1] = datos[1];
            datos_recibidos[2] = datos[2];
      

            //Read the information and put it in a vector3

            //Take the vector3 and apply it to the object this script is applied.
            stream.BaseStream.Flush(); //Clear the serial information so we assure we get new information.
        }
    }

You can set the mesh of a gameobject by changing the mesh property of its mesh filter. First you would have to construct the mesh using the Mesh class, and then assign its corresponding points and order of points (i.e triangle indicies). Like so:

[RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))]
public class CreateMesh : MonoBehaviour
{
    public Vector3[] Points;
    public int[] TriangleIndicies; // order of points

    private void Start()
    {
        // Pseudocode for getting the points and the order
        // (I assume you already handled this bit yourself)
        Points = Arduino.GetPoints();
        TriangleIndicies = Arduino.GetTriangleIndicies();

        // Set the mesh of the gameobject to the arduino-constructed mesh
        GetComponent<MeshFilter>().mesh = ConstructMesh();
    }

    public Mesh ConstructMesh()
    {
        Mesh mesh = new Mesh
        {
            vertices = Points,
            triangles = TriangleIndicies
        };

        return mesh;
    }
}

This can be put on any empty gameobject and should automatically add a mesh filter, mesh renderer, and draw the mesh given by the arduino data. Hope this works! @unity_slcKZ-2Fhcmm0Q