Wifi can be found fairly widely, the big problem though is that almost all of them need a UAE mobile number to receive your login details. Non-UAE numbers aren't accepted. Login pages often look like this, with the UAE restriction:
RestAssuming you do have a UAE number (/get one), then you can find wifi at most of answer following shortlythe main metro stations, tram stops, various public spaces, museums etc. Most of the malls too. The Mall Of The Emirates (the one with the ski slope in it) is UAE-only, the Dubai Mall (Burj Khalifa attached) does unusually let you register with foreign numbers
Many western-style cafes have wifi, but you need to ask for a password, normally given as a one time ticket or scratch card. They often seem to have time or data restrictions, which mean you'd struggle to be there for hours.
Wifi that you can access without a password and without registration is very very rare in Dubai
Given that you'd have to get a UAE sim anyway to get online with most wifi, you might be better off getting a UAE sim + loading some cheap-ish data onto it and using that!