Only get types once in mergeArrays

Make a max of 2 calls to exports.getType instead of 4 calls.
Should be slightly faster and a little smaller when minified.