Template function to init tuple