These can all be correct depending on the wider context:
I wish I knew where my friends were.
I wish I knew where my friends are.
I wish I had known where my friends were.
‘have known’ is not correct with the rest of this phrase.
b. The same time
When the subordinate clause refers to the same time as the main clause, the Simple Past Subjunctive is usually used in the subordinate clause. In the following examples, the verbs in the Simple Past Subjunctive are underlined.
e.g. When she was at the party, she wished she were at home.
Now that he is in China, he wishes he understood Chinese.
When we begin the trip, they will wish they were with us.
"
i gues i understand our brother’s problem to express whises in past to mean future.i think it will be like this " i wish i could have bought a car ,or would have bought a car.but at the end according to a TOFEL book both COULD HAVE WOULD HAVE OR HAD bought a car looks like the same with a a slight difference