Revert the changes in `arrow_writer.py` from #6636
#6636 broke `write_examples_on_file` and `write_batch` from the class `ArrowWriter`. I'm undoing these changes. See #6663.

Note the current implementation doesn't keep the order of the columns and the schema, thus setting a wrong schema for each column.