pid: Replace struct pid 1-element array with flex-array