One tricky bit is that pixels in iOS are not really physical pixels. You draw in points, but you probably have a 2x or 4x device.
A better way to do pixel mashing is to use a numpy array, and use that as a backing to an IOSurface.
For a long thread about a few different topics about doing fast real time things in pythonista, see
In particular, take a look at the IOSurfaceWrapper, included at the start of
This exposes a numpy array that is m x n x 4, which allows you to set pixels as desired, inside the .Lock() context manager.
Since you are doing raycasting, you may be able to do efficient vectorized equations that lets you calculate the whole array at once.