Implement a function that processes this data array and handles empty or malformed inputs. The function receives an array that should contain finite numbers, ignores invalid elements, and returns a dictionary with the valid value count, sum, and average. If the input is not a list or contains no valid numbers, return zero for count, sum, and average.
Function signature: def process_data(data):
A boolean is not considered a valid number.
data may be any Python value, including None, a dictionary, or a listdata is a list, it may contain integers, floats, strings, booleans, null values, or other objectscount, sum, and averagedef process_data(data):