Several changes to the read() and write() methods (alternative)

This implements several changes to the `read()` and `write()` methods.

- Add `always_2d` argument to `read()`
- Add `out` argument to `read()`
- Add `fill_value` argument to `read()`
- Add `read()` and `write()` functions