CSHARP-750: Added optimizations for ThreeDimensionalArraySerializer and TwoDimensionalArraySerializer.