Yes tomatoes are in the same family. I was surprised when I found that out because the plants are so different. Eating the leaves of tomatoes is a bad idea .oO(hopes that we get some sun this year so the tomatoes grow).
The process of metal extraction by plants is called phytomining BTW. Perhaps we could use potatoes to get rich extracting heavy metals from the ground. There is so little arsenic in the ground (generally) that there is not danger from poisoning. I believe that is some naturally occurring arsenic in Cornwall but it is at levels where even if a plant accumulates it there is no danger. Apparently, and this may be urban legend or just plain bad science, people that consume tiny amounts of arsenic live longer.