The Structs and Objects packages (see str and obj) allow Prolog to hold pointers to C data structures and arrays and access and store into fields in those data structures in a very efficient way.
Support for translating between Prolog terms and C data structures is
library(terms) and lists can be mapped to C arrays
library(vectors). These are useful when you want to pass a
complete copy of the data structure over to the other language. If
you only want to access parts of a structure then the Structs and
Objects packages are recommended.