You want to contact a licensed plumber in your area with experience in providing hot water. The plumber will ask you if you want to provide individual metering for each apartment or general hot water to the entire building. This would involve one large tank or several smaller ones to satisfy the plan you have in mind and what will be permitted under your local jursidiction.