I don't really have much of a programation background but I know a thing or two. I havemy doubts that what you ask would be achievable, unless the sketches are all made parralel to the same plane and would be doing an extruded cut all in the same direction.
If you don't do an extruded cut through all you then you would need to parameterize each and single of the detected sketch.
Maybe I'm wrong on that though, I'd wait for someone with more knowledge then me to answer.
You need to traverse the feature tree to find sketches instead of using SelectByID. There are several examples in the API help... One of them actually looks for sketches. It hides them rather than extruding them, but still pretty applicable.