In the situation described above, if the person spent the months of Ramadan in the last 3 years in a state of unconsciousness in which they had no clue that it was Ramadan, and this condition persisted throughout the month of Ramadan without any intervals of consciousness, then such a person is not obligated to fast according to Shariah. In this case, there is no obligation to perform qaza for the missed fasts or give fidyah.
However, during this 3-year period, if they regained consciousness even for one day during the month of Ramadan, they must perform qaza for the fasts of that year's Ramadan. This is because fasting in Ramadan became obligatory for them when they regained consciousness, and according to the question, they missed these fasts, thus qaza became obligatory.
۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔
دلائل:
الفتاوى الهندية: (208/1، ط: دار الفكر)
المجنون إذا أفاق في بعض الشهر يلزمه قضاء ما مضى، وإن استوعب جنونه كل الشهر لم يقضه، وفي ظاهر الرواية لم يفصل بين الجنون الطارئ على البلوغ والمقارن له كذا في محيط السرخسي.
Allah the Almighty knows best.
Darul ifta Al-Ikhlas, Karachi.