Array.sort operates in place