It is not possible to use a variable in an IN operator this way. There are two options that I can think of; one of which I can recommend.
1) Use dynamic SQL (ugh!)
2) Use a table valued function which accepts your variable as an input and returns the values in the table
where idcars in (select value from dbo.Split(@array))I'd go with option #2
There is a foolish corner in the brain of the wisest man. -Aristotle, philosopher (384-322 BCE)