Remove temporary std::vectors that ca be replaced with ArrayRef's magic.