Fix filled-new-array tests, refactor