...do you think a IF diet that would have a proper calorie surplus would still allow to build muscle?
Building Muscle
As Snowman said, you can gain muscle on an Intermittent Fasting Diet. That providing you have a "proper calorie surplus".
Think of it like an American Football Game. It doesn't matter how many points you score in each individual quarter of the game or if your "Time of Possession" was more than the other team. All that matter is the final score.
It's the same with Intermittent Fasting. As long as you are in a calorie surplus at the end of the week, you gain weight/muscle mass. That providing you have a well formulated diet and training plan.
...you will gain weight faster by eating 3-4 meals throughout the day.
Eating 3 - 4 Meals
Think of this like working. In most jobs, if you work 5 days a week, you're going to make more money than if you only work let's say 3 days a week.
There is a directly relationship to the amount of time you work each week and the amount of money you make.
Thus, as Snowman states, "Eat more, gain more."
Christian Thibaudeau had this plan ‘Primer 52’ which uses a sequence of fasting-hypertrophy-strength for diet and training.
Thibaudeau
Thibaudeau is definitely one of the smartest in the business. The "Primer 52", (I am not sure why it was named that) as he stated it is a modified version of the "5/2 Diet" of TC Luoma. Luoma's "5/2" is modification of Dr Krista Varaday's Alternate Day Diet for weight loss.
Bodybuilding's Bulking and Cutting
This is what Bodybuilder have successfully done for decades, Calorie Rotation.
Periods of increased calorie intake for gaining weight and decreased calorie intake for losing weight. Dieting is essentially a Periodization Training Program only with food for gaining or losing weight, dependent on your objective.
The General Adaptation Syndrome, GAS
The foundation of Periodization Training and Calorie Rotation is based on GAS. That because the body eventually adapts. When adaptation occurs, progress stops.
The MATADOR Study
This research determined that the body will adapt to a lower or higher calorie intake in approximately two weeks. Thus, this diet for weight loss is based on decreasing calories for two weeks, then increasing them for two weeks, then repeating the sequence.
Thus, some form of Calorie Rotation is required to either maintain weight loss or gain.
It’s intriguing for me, although a 24-36h fast twice a week does scare me off in terms actually gaining muscle.
Intermittent Fasting
I understand your concern. However, the bottom line is as long as you are in a calorie surplus for week, you will gain weight.
My longest fast was 47 hours. I didn't lose any weight during the week because I made up for it, consuming more calories, once I went back to eating.
Kenny Croxdale