Three-dimensional structures obtained by double diffusion and electrochemical etch stop