Arduino: put string through variable in array
A String isn't a char array. You can't assign one to the other.

You shouldn't be using String, it's too heavyweight, and how you are passing your String object is wrong, it wastes huge amounts of memory making clones.

You should read this.

The only time you should ever consider using a String object is if you are using a third party library that requires a String object - and even then you should consider other methods.

Regardless of that, you need to copy the content of your string, not the string itself.  This code should work, but it doesn't address the underlying String issues:

String splitStringIntoCoordinates(String &amp;input){
  char arr[input.length() + 1]; // Create a char array big enough including the terminating NULL
  strcpy(arr, input.c_str()); // Place incoming route in char array
  // ... etc ...
  // return a string
}


If you just want to reference the String as a C string you can just use the function input.c_str() to get the internal char * array pointer.