pid: reduce code size by using a pointer to iterate over array