Refactor "pwv_check" and "pwa_check" datasteps using arrays.