PixelArray is now obsolete, sorry. I recommend downloading the dev version of U++, raster Image handling is vastly refactored.
In the new version, PNGEncoder has Bpp method (bits per pixel). Put there 8 to have 256 colors palette. If you have existing palette you want to retain, use SetPalette.