path: refactor normalizeArray

avoid use Array.splice