Use DenseElements to serialize/deserialize dense arrays
Use DenseElements to serialize/deserialize dense arrays

This avoids asan issues, makes the code a lot cleaner, and avoids depending on implementation details of how the data is laid out.
