Method to generate fibonacci array and find nth value