PixelDiodeMatrix: reduce the usage of shared pointers to simplify the code and maybe slightly speed it up as there is some overhead in using shared pointers.
PixelDiodeMatrix
/cc @oda @nstyles