1) Look into imageDataStore, pixelLabelDataStore functions which can basically store your input image and corresponding masks
2) you'll need to resize all your images and masks to the same size. Eg. 256 x 256 (.png).
3) I am not sure how many classes you are looking at for this example. Essentially you'll be creating a mask per image. Intialize as zeros say uint8 class. Assign everything in class one as 1, class 2 as 2..etc.. or you could labels and make it a categorical array
MATLAB has some examples using Unet architecture that might be worth looking at.
Good luck!
Best Answer