Dynamic array data structure for OCaml