pass array to c and fill it in c as opposed to return c pointer