also take length in Mapping.write

Might be useful if you write e.g. the data from a pointer.