I don't understand. If you have a 6x6 image, even though there are 20 independent pictures them stacked into a 3-D array, how are you going to convolve that 6x6 image with a 3-D 3x3x2 kernel? Plus, why are you doing it anyway since the valid results (with no edge effects will only be the 4x4 inner part of the array?
If you did use a 3-D filter on the 3-D stack of images, you'd basically be combining layers (slices) when you get the result. Is that what you want? Why? Please explain it to me so I can see if that's what you really need to do. What is the larger context here?
And anyway, you wouldn't do all that stuff with cell arrays or cellfun(), you'd simply call it once with the 3-D arrays:
outputImage = convn(imageStack3d, kernel3D,'valid');
Finally, I have no idea what a "bucle function" is. What is it? Regardless, I agree that you don't need whatever it is. All you need is the line of code above.