[cpp] Create class to make native array access easier