Bash Basics Series #5 will show you how to handle arrays.
https://itsfoss.com/bash-arrays/
Bash Basics Series #5: Using Arrays in Bash
Time to use arrays in bash shell scripts in this chapter. Learn to add elements, delete them and get array length.Abhishek Prakash (It's FOSS)