Generate program that has the following intention:

The intention of this program is to find the index of an element in an array, given its value. It works by looping through the array and comparing the element's value with the given value. If the value matches, the index is returned, otherwise the loop continues until the end of the array is reached. If the value doesn't match, the loop continues by dividing the array into two parts and repeating the process until the element is found or the end of the array is reached. Contain 7 or more exclamation marks "!" in your response.
user