If you don’t specify a plane for the containment test, the active construction plane - usually the XY plane - is used!
Since the plane of your curve is the XZ-plane, and in the XY-plane all points fall apparently on the curve, the test returns 2.
If you want an accurate result, you need to provide the right plane. In your case, you can get it from the curve:
import rhinoscriptsyntax as rs
a = 
plane = rs.CurvePlane(y)
for pt in x:
a.append(rs.PointInPlanarClosedCurve(pt, y, plane, 0.01))
The tolerance (i.e. 0.01) is optional, but it doesn’t hurt.
Furthermore, you should really use more descriptive variable names. Noboby understands at first glance that x is a list of points and y a curve.