Return an array from an array-like object.