Deprecate fromarray mode argument
Resolves #9006
#2856 (with 12 likes), #3781, #4887, #5227, #5465 and #5723 are all issues where the Image.fromarray() mode parameter has caused confusion.
https://github.com/python-pillow/Pillow/issues/5465#issuecomment-831871276
I think that the mode to use parameter is a footgun. It’s not an implicit conversion, it’s a cast.
Since those, #5849 improved the documentation, but it's not done causing problems, as #9006 objects to the fact that one type of array can't be correctly read using an explicit mode argument, but mode=None can handle it without a problem.
This PR suggests just deprecating the argument altogether.
There is a small loss of functionality in that P mode images can no longer be directly created using fromarray(). Currently, this can be done with Image.fromarray(a, "P"), but because array data does not contain palette information, this would no longer be possible.