Filter used in Selectelement2 and such is just an array of strings where values are type names that are used in Automation (i.e. "Product", "Point2D", "Vertex"). All of above (and more) ks written in automation documentation (V5Automation.chm)
There are more than enough examples of how to call selection functions both from CAtScript and VBA.
Arrays and ReDim are common VB concepts that have been discussed widely on VB forums. This is CATIA forum and not a place to learn basic programming.