The collective sukkah
בסוכות תשבו שבעת ימים כל-האזרח בישראל ישבו בסכת
You shall dwell in sukkos for seven days; every citizen in Israel will dwell in sukkos
Chazal learn from this verse that, hypothetically speaking, the entire Jewish people can fulfill the mitzvah of dwelling in a sukkah using one sukkah for everybody. Each person would use it, one after the other. However, how can this be? There is an obligation to turn one’s sukkah into their permanent dwelling. We are supposed to spend day and night there. This isn’t possible to accomplish if everyone had to share one sukkah! Another question: why does the verse start in second person, תשבו, and end in third person, ישבו? It starts with you shall dwell, and ends they will dwell.
There’s a verse which implies that King Shlomo built an altar for idol worship. However, the verse is phrased in third person future tense: אז יבנה שלמה. This is interpreted to mean that he intended to build it, but it never actually happened. We see then that a י at the beginning of a word, which is third person future tense, can sometimes connote a simple intention being considered an accomplished act. So too ישבו in our verse. We are obligated to dwell in a sukkah for seven days. However, it if rains or is too uncomfortable, we are exempt and can leave. Despite the exemption, Hashem considers our desires to fulfill the mitzvah to be as if we actually did. This is implied by the end of the verse, which says ישבו בסוכות, third person future tense.
However, despite hardship, there is an obligation to eat a requisite amount of bread in the sukkah on the first night. It doesn’t matter how hard it is raining. With this information, we now have a way to resolve the verse. As demonstrated, the verse is referring to a case where it is not possible to fulfill the mitzvah of sukkah. Nevertheless, Hashem considers it as if the mitzvah was fulfilled. Yet, since there is an obligation to eat some bread in the sukkah the first night, even if it’s raining, there’s no excuse not to. However, Hashem in this case provided a special dispensation. Instead of everyone needing to own their own sukkah, it’s possible for the entire Jewish people to share one sukkah. They would each take turns, one after the other, to eat their requisite bread.
 Based on Chasam Sofer’s Derashos I p. 49b s.v. ובפסוק בסוכות תשבו
 Leviticus 23:42
 Sukkah 27b; Sifrei Devarim § 140
 בסכת implies one sukkah (Rashi ad. loc.). Cf. Torah Temimah ad. loc. § 171
 Shulchan Aruch Orach Chaim § 639
 See the Magen Avraham ad. loc. § 8 who asks similarly: how can a person fulfill the mitzvah of sukkah if they don’t have a private one for just them and their wife, like their house during the rest of the year?
 I Kings 11:7
 Shabbos 56b
 Shulchan Aruch ad. loc. § 5
 Based on the principle that הקב”ה מצטרף מחשבה טובה למעשה (Kiddushin 40a)
 Shulchan Aruch loc. cit. with Rema