Merging sorted arrays with defined length in Python (good practices)