How exactly i am not sure of yet.. selection might be easiest through settings or gallery as those are already installed and have inbuilt support but download could be done through script. Maybe use imagemagick to give support for crop/resize or something. Other features could be change wallpaper every boot or after a delay. Just thoughts right now. First implementation would be to use prepackaged images and downloaded from the net using wget.