A teenage boy has been arrested and a gun seized following an overnight police chase in Western Sydney.