Function to incorporate an option in each Page

It sounds like you need custom meta boxes. You could either create your own plugin to add them or use a plugin like Advanced Custom Fields. You would add two meta boxes to each post type where you want to be able to select these options, one to select the image, and another to set an opacity. For an overview of creating your own meta boxes – Add custom meta box on Post page

From there, you would need to output custom CSS using the selected image and opacity as the background for one of the elements on the page – perhaps <body> or <main> but it would depend on your theme. You could either create a child theme and output the <style> tags directly in header.php or you could add to your own plugin and have it output the <style> tags at the wp_head() hook.

From here I’d suggest working on adding the custom meta boxes first, and come back if you get stuck on a specific step.