docs: protected void writeArray(Class<?> arrayClass, Object array, CharBuf buffer) {
          if (Object[].class.isAssignableFrom(arrayClass)) {
              Object[] objArray = (Object[]) array;
              writeIterator(Arrays.asList(objArray).iterator(), buffer);
              return;
          }
          buffer.addChar(OPEN_BRACKET);
          if (int[].class.isAssignableFrom(arrayClass)) {
              int[] intArray = (int[]) array;
              if (intArray.length > 0) {
                  buffer.addInt(intArray[0]);
                  for (int i = 1; i < intArray.length; i++) {
                      buffer.addChar(COMMA).addInt(intArray[i]);
                  }
              }
          } else if (long[].class.isAssignableFrom(arrayClass)) {
              long[] longArray = (long[]) array;
              if (longArray.length > 0) {
                  buffer.addLong(longArray[0]);
                  for (int i = 1; i < longArray.length; i++) {
                      buffer.addChar(COMMA).addLong(longArray[i]);
                  }
              }
          } else if (boolean[].class.isAssignableFrom(arrayClass)) {
              boolean[] booleanArray = (boolean[]) array;
              if (booleanArray.length > 0) {
                  buffer.addBoolean(booleanArray[0]);
                  for (int i = 1; i < booleanArray.length; i++) {
                      buffer.addChar(COMMA).addBoolean(booleanArray[i]);
                  }
              }
          } else if (char[].class.isAssignableFrom(arrayClass)) {
              char[] charArray = (char[]) array;
              if (charArray.length > 0) {
                  buffer.addJsonEscapedString(Chr.array(charArray[0]), disableUnicodeEscaping);
                  for (int i = 1; i < charArray.length; i++) {
                      buffer.addChar(COMMA).addJsonEscapedString(Chr.array(charArray[i]), disableUnicodeEscaping);
                  }
              }
          } else if (double[].class.isAssignableFrom(arrayClass)) {
              double[] doubleArray = (double[]) array;
              if (doubleArray.length > 0) {
                  buffer.addDouble(doubleArray[0]);
                  for (int i = 1; i < doubleArray.length; i++) {
                      buffer.addChar(COMMA).addDouble(doubleArray[i]);
                  }
              }
          } else if (float[].class.isAssignableFrom(arrayClass)) {
              float[] floatArray = (float[]) array;
              if (floatArray.length > 0) {
                  buffer.addFloat(floatArray[0]);
                  for (int i = 1; i < floatArray.length; i++) {
                      buffer.addChar(COMMA).addFloat(floatArray[i]);
                  }
              }
          } else if (byte[].class.isAssignableFrom(arrayClass)) {
              byte[] byteArray = (byte[]) array;
              if (byteArray.length > 0) {
                  buffer.addByte(byteArray[0]);
                  for (int i = 1; i < byteArray.length; i++) {
                      buffer.addChar(COMMA).addByte(byteArray[i]);
                  }
              }
          } else if (short[].class.isAssignableFrom(arrayClass)) {
              short[] shortArray = (short[]) array;
              if (shortArray.length > 0) {
                  buffer.addShort(shortArray[0]);
                  for (int i = 1; i < shortArray.length; i++) {
                      buffer.addChar(COMMA).addShort(shortArray[i]);
                  }
              }
          }
          buffer.addChar(CLOSE_BRACKET);
      }