Data selection and filtering
Indent your code!
Naming convention


Only use English


paivitys -> update -> though really this should be with a subject, so updateObjekt?
dataa -> data
arvvoja -> values
paivitaselekt -> updateSelection

Dont mispel


ssellecct -> selectElement
oppttion -> option

Use lowerCamelCase


infoarray -> infoArray
chosenid -> chosenId
choseninfo -> chosenInfo

myFunction -> this is an unfortunate name, it does not say anything about its functionality
The names of your HTML elements id's can be improved

Dont mix var and const/let
Don't console.log() in production code
Comments should improve understanding, //------ does not do that, just use newlines/whitespace
Dont assign onclick events in html with onclick, use addEventLister()
It seems people is a global variable, don't create global variables
It seems you create people and infoarray, then assign people to infoarray, and then never use people again. It does not seem to make sense