For a new project, I need to clone several times the same object. Instead of adding several sessions in my viewer, I prefer to clone it for better repsonse time.
mat4 is simply an array of 16 numbers (column-major matrix representation), vec3 is an array of 3 numbers.
If you do not want to use the gl-matrix package, you can also use Matrix4 of three.js.
The Matrix4.toArray function gives a column-major matrix representation like mat4.