Pixel array alocation refactoring