The Role of Carrier Diffusion and Indirect Optical Transitions in the Photoelectrochemical Behavior of Layer Type d‐Band Semiconductors