Refactor ndarrays() into static methods

Also, add more tests of streaming evaluation.