Fix some cases were ArrayRefs were being passed by reference. Also remove 'const' from some other ArrayRef uses since its implicitly const already.
Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created.