bash – add Array in the code Scenario is in the description with code

Write bash script which only accept a palindrome value in an array also print the length of the given value by the user and find the largest length palindrome word from the given values in an array
Expected Output:
Input a palindrome value: cat
Wrong input
Input a palindrome value: MOM
Correct it’s a palindrome the length of the given value is 3
add Array in the code

echo "Input a palindrome value:"
read str
for i in $(seq 0 ${#str}) ; do
        revstr=${str:$i:1}$revstr  #finding reverse of the str
done

if ( "$str" = "$revstr" ); then  #checking if reverse of str is equal to str
        echo "Correct it’s a palindrome the length of the given value is ${#str}"
else
        echo "Wrong input"
fi