Account for path segments that are array indexes in Object assign