C++ inline vs. method

try
**new code

const char * readBytes(char *inArray, int arraySize)
{
  //send in an empty allocated array of your choosing
  int m = 0;
  while (m < arraySize)
  {
    if (Serial.available())
    {
      inArray[m++] = Serial.read();
    }
  }
  return inArray;
}

Java and modern languages have garbage collection. Even Objective C didn't have GC until recently. You had to clean up your own mess. GC does add extra resources to the app. You'll never see it in the Arduino.