Improve API for array-related functions

Use size_t for specifying array_length