Function handleArray