convert HalContext into void* array