Parameter points to an array of items.
NULL is ok, both for passing and for returning.
Parameter for input and for returning results. Default is transfer full.
Free data after the code is done.