arrays: fix warnings size_t -> int conversion