Picky eating is largely influenced by genes and peaks at the age of seven, scientists have found.