On your code, you using analogRead but declaring the pin (A3) as output. Change it to pinMode(A3,INPUT);
Aside from that, PWM is basically a digital output which changing (HIGH and LOW) at specified frequency. When the result you got is
0 0 1022 1021 0 1022 1021 0 0 1021 0 1021 1021 0 0 1021 0 0 1022
There's nothing wrong. 0 --> LOW, and 1021++ --> HIGH
If you want "measure" something from the PWM, use pulseIn() instead, you can check the documentation here.
If you want to measure the PWM value, I suggest you read:
Can I connect a PWM pin on one Arduino to an analog input on another?Can I connect a PWM pin on one Arduino to an analog input on another?