Assuming you want to extrude at a distance of z, you need to follow these steps:
0) let n be the initial number of vertices (4 in your example)
1) For each vertex in your vertex array, add (0,0, z) to it and add the result to your vertex array, for a total of 2 * n vertices. So, for your example, you add the vertices (0,0, z), (10,0, z), (10,10, z), (0,10, z) to your vertex array, for all of 2 * 4 = 8 vertices.
2) ( ) . (3 ). , ( ). 6 4 (3,1) (1,3).
3) (a, b, c) , (a + n, b + n, c + n).
4) , . (a, b) , 2, (a, b, b + n) (b + n, a + n, a)
. , .