PERF: use `blk.dtype` in `where()` & `_setitem_frame()`
- [ ] closes #61010 (Replace xxxx with the GitHub issue number)
- [ ] [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
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

this pr is a one-line change to the code here:
https://github.com/pandas-dev/pandas/blob/d1ec1a4c9b58a9ebff482af2b918094e39d87893/pandas/core/generic.py#L9735-L9737


### Performance comparison:

#### test script:
```python
import numpy as np
import pandas as pd
import timeit

for width in [10, 1000, 1000_00, 1000_0000]:
    df = pd.DataFrame(np.random.randn(1, width))
    mask = df > 0.5
    tm = timeit.timeit("df.where(mask)", number=10, globals=globals())
    print(width, tm)
```

#### for _dt in cond.dtypes:

10 0.002963045029900968
1000 0.006705133942887187
100000 0.40306550299283117
10000000 46.55275956704281
![image](https://github.com/user-attachments/assets/2f028c89-b868-45f2-9f01-dc0bcd9ba446)

#### for _dt in cond.dtypes.unique():

10 0.0028260269900783896
1000 0.002695770002901554
100000 0.042065858957357705
10000000 6.068146598991007
![image](https://github.com/user-attachments/assets/ade4f6a5-cc1a-47e4-8633-73c90522e64b)

#### for _dt in [blk.dtype for blk in cond._mgr.blocks]:

10 0.0009857049444690347
1000 0.0011893719201907516
100000 0.003112988080829382
10000000 0.13763279700651765
![image](https://github.com/user-attachments/assets/086371f8-a0f4-4d09-8130-d10ce0697565)

@mroeschke 
Hi, do I need to add this in whatsnew? 2.3.0 or 3.0.0? This pattern is also found in `_setitem_frame`:

https://github.com/pandas-dev/pandas/blob/5da9eb726c915412928ee44a0631a74bda614556/pandas/core/frame.py#L4276-L4289

#### Before
![image](https://github.com/user-attachments/assets/b21f596b-b292-4cf8-9106-e4da99eb4bb1)
#### After
![image](https://github.com/user-attachments/assets/4fcaf7bf-8872-4279-a3a7-f06a3f565131)

 >  Hi, do I need to add this in whatsnew? 2.3.0 or 3.0.0?

`v3.0.0.rst` please Thanks @auderson 