Another formula that might be your friend is AVERAGEIF or AVERAGEIFS.
My approach uses SUMPRODUCT which will perform array like calculations without being an array.
1) Build a table averages
In my example I listed out the month number for each month regardless of year in E2 to E13. In the adjacent column use the following formula in F2 and copy down to F13.
The IFERROR function is used to deal with the divide by 0 error that will occur if there is no value for a given month. If you prefer to see 0 instead of a blank, change the "" at the end to 0.
The above formula is based on the assumption that your dates are actually strings. If they are actually dates then use the following:
2) Find the maximum Average
In the example below I used the following formula in I2:
3) Find the corresponding month
In J2 I used the following formula to look up the position of the max value in the list. If their are repeat / tied maximums, it will return the first month.