`attributesToArray` can handle instances of `ArrayableInterface`

basically some mutators can return instances of `ArrayableInterface`, and this case is not handled by `attributesToArray`, so put that condition in there