解:∵点$A$的坐标为$(2,$$0),$∴$OA = 2$
又点$P $在直线$y = x$上,且$\triangle OP A$是等腰三角形
∴$OP = OA$或$P A = OA$或$OP = P A$
$①$当$OP = OA = 2$时,过点$P $作$P B\perp x$轴
设点$P $的坐标为$(a,$$a),$则$OB = |a|,$$P B = |a|$
在$Rt\triangle OP B$中,由勾股定理,
得$OB^2+P B^2=OP^2,$∴$2|a|^2=4,$解得$a = \pm \sqrt 2$
∴点$P $的坐标为$(\sqrt 2,$$\sqrt 2)$或$(-\sqrt 2,$$-\sqrt 2)$
$②$当$P A = OA$时,易得点$P $的坐标为$(2,$$2)$
$③$当$OP = P A$时,过点$P $作$P D\perp x$轴
则$OD=\frac 12OA = 1$
对于$y = x,$令$x = 1,$得$y = 1$
∴点$P $的坐标为$(1,$$1)$
综上,点$P $的坐标为$(\sqrt 2,$$\sqrt 2)$或$(-\sqrt 2,$$-\sqrt 2)$
或$(2,$$2)$或$(1,$$1)$