extract out shared gpu_array_requires_device_allocation