Renders a single ndarray as a greyscale image, returning the canvas element.
If a canvas element is not supplied, a new one will be created.
Values in the array are expected to range between 0 and 255.