On-Sensor Visual Inference with A Pixel Processor Array