I will not share the exact code given you have been suggested how to move in detail earlier.
Though I will still nudge you with few more pointers (hopefully) on top of what Griff has already shared.
What/How array or list of textboxes would look like:
TextBox[] myTextboxArray = new TextBox[2];
myTextboxArray[0] = TextBox1;
myTextboxArray[1] = TextBox2;
List<TextBox> myTextboxList = new List<TextBox>();
myTextBoxList.Add(TextBox1);
myTextBoxList.Add(TextBox2);
mytextBoxList.Add(TextBox3);
Couple of learning articles:
Arrays - C# Programming Guide | Microsoft Docs[
^]
Create controls dynamically and retrieve values from it in ASP.Net using C# and VB.Net[
^]
Learn and try again. This is for your benefit as these come under basics.