I have a large 1D dynamic array in my program that represents a FITS image on disk i.e. it holds all the pixel values of the image. The type of the array is double
Adapt the answer from Converting RGB data into a bitmap in Objective-C++ Cocoa to your data.