I haven’t had a chance to test this, so there may be typos, but something like this I think:
a = [];
for ( i = 1; i <= thisComp.numLayers; i++){
L = thisComp.layer(i);
if (L.name.substr(0,4) == "smet"){
a.push(fromComp(L.toComp(L.anchorPoint)));
}
}
createPath(a,[],[],false)