Revert "back to non-memory locality preserving input/output"
Revert "back to non-memory locality preserving input/output"

This reverts commit 14815b39e9aaa41bc131713c9615f946ca897a7d.

stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math