Geometry shaders run per-face and can be used to pass data per polygon to the pixel shader.
When used on triangles, they take as input 3 vertices and output 3 vertices, but they're essentially de-duplicated at this point, so the fact that one vertex is shared between multiple triangles doesn't matter from the Geometry Shader onwards. Since uints aren't interpolated you don't have a problem in that regard, the index is taken from the 'leading' vertex in the triangle.