Masking is the method to ignore specific pixels in an image when calculating statistics or processing data. The documentation discusses masking and how to use it in the API here:
http://www.harrisgeospatial.com/docs/Masks.html It is true that if you have pixels that are randomly located in each band in an image stack, you will need to generate and process each band separately.