Multileaf collimation for electron intensity modulation