Fatal error: Declaration of ... must be compatible with
BlockBase implements BlockPluginInterface, which defines blockForm() as follows:

public function blockForm($form, FormStateInterface $form_state);


Interfaces are like contracts. Any class that implements an interface (or one of it's descendants) must define all the functions in the interface, and they must be defined exactly as in the interface. This is so that developers can replace classes, but ensure the code will still work, since the function definition will always expect the same values, as defined by the interface.

When you add a typehint to force $form to be an array, you break the contract of the interface. The interface says that any value should be allowed for the $form argument, but you are saying it must be an array. If you used your code, and a function passed a non-array value, it would cause an error. The interface is there to prevent such errors from happening. This is why you cannot change the function definition.