PERF: Add var to masked arrays
- [ ] closes #xxxx (Replace xxxx with the Github issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

This patch may have induced a potential regression. Please check the links below. If any ASVs are parameterized, the combinations of parameters that a regression has been detected appear as subbullets. This is a partially automated message.

 - https://asv-runner.github.io/asv-collection/pandas/#series_methods.NanOps.time_func
   - func='var'; N=1000000; dtype='boolean' Here is a more direct link (still need to workout how to incorporate parameterizations in the link):

https://asv-runner.github.io/asv-collection/pandas/#series_methods.NanOps.time_func?p-func='var'&p-dtype='boolean'&p-N=1000000 Hm guess boolean is special casy here. We could cast the array to float, this would get most of the regression back, but not sure if this is worth it Taking the variance of Booleans seems pretty rare to me, but at the same time, the solution sounds very easy. I'm thinking to at least open a tracking issue.