Implement lowering for allocate_array