If the first argument to this function is a foreign array, it is returned. If it is not, the foreign array with the desired dimensions, element type, and initial-element is made and returned.
— Function: grid:ensure-foreign-array object &optional dimensions element-type initial-element
If object is not a foreign array, make and return a foreign array
with the dimensions and element-type. If object is a
foreign array, it is returned.
(grid:ensure-foreign-array nil '(2 2) 'double-float)