walk_replace: allow array at top level