Don’t get me wrong, I think it would be great if we had this kind of script, I just guess the complexity will go through the roof very, very fast.
I’m all in favor of creating community documentation (as you mentioned here) and I actually also asked for something like that here:
“…to dedicate a special section for user contributed howtos, where you see very concrete descriptions of installations, like installing “xwiki 9.x on centos 7.x with tomcat 8.x and mysql 5.x”.”
That also would give you an overview what people want to achieve and see what you (or the maintainer of the said script) would have to implement.