face indices from vertex lists

How can you dynamically create a list of face indices from a list of vertices ?

When calculating vertex normals, you have to calculate face normals first, and that’s no problem but how do you create the face indices in the first place from for example an array of vertexes from a triangle without writing out the faces by hand ?