Gathering Mean and StDev from multiple inputs at once

You've never heard of arrays? An array of pin numbers and an array of Statistics objects, and you'd have less than half as much code.