Matrix Array Optimization

Simple optimization to reduce the function call and branching overhead when applying an array of Matrix to an effect.

Also added missing parameter checking to other Matrix calls.