How let Shield reply to a SMS sent from mobile .(NOT in serial monitor)

Just a couple of quick observations:

You never reset index when you leave setup(). As a global variable it will retain its value.

When I initialise a character array I set each one to '\0' so you automatically have an end marker when printing it out.

I would suggest that you sit down with pencil and paper and work out what you want the program to do and when it wants to do it. When do you want to print the array out? When do you wan to clear it? Have a look at the serialRelay program again and study that.