Rewrite to support config arrays with ordering