This certainly explains why setting values overwrites formulas, but wouldn't it be nicer if there were a way to getValuesandFormulas together into an array?
If (like me) you were distracted into getValues and getFormulas, realise that you can use copyTo between ranges to copy the overall contents!