Ya I think you would just use CNAME records to point all of your sub domains to the same dyndns sub domain and then handle differentiating them all with vhosts. As for your raspberry pi, you might have to have a vhost on your apache web server that would act like a proxy server, sending all traffic from a hostname (sub domain) to the pi's ip. Here's an example of a vhost proxy configuration (goes in Apache's config, probably httpd.conf)
<VirtualHost *:80>
ServerName rpi.example.com
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost>
Replace localhost and port number with the ip and port of the raspberry pi