I've seen some maps depict the uae being a part of the british raj and I've also wondered why the uae has so many immigrants and people that are from the indian subcontinent. Any answers?
As a kind of contextual preface that I think will help answer the question, the modern United Arab Emirates consists of seven Emirates: Abu Dhabi (primus inter pares; the ruler of Abu Dhabi is President of the UAE), Dubai, Sharjah, Ajman, Ras al-Khaimah, Fujairah, and Umm al-Quwain. Prior to their independence were all of these emirates were part of "Trucial Oman", a name that referred to the treaties of truce that existed between Britain and each sheikhdom. Similar treaties and relationships existed with Muscat and Oman (the modern state of Oman) and with Bahrain and Qatar.
The primary purpose of these treaty relationships was to guarantee the safety of British/Indian trade in the Gulf. In the 19th century piracy was a major concern in the Gulf from these quasi-governed areas, not unlike piracy has been a concern in 21st century Somalia in a similar fashion.
As an administrative matter, all Gulf matters—including all of the aforementioned treaty sheikhdoms as well as Kuwait and Iraq—were under the purview of the India Office. That's why, for example, the the WWI invasion of Iraq was conducted by Indian Expeditionary Force - D. It also just makes sense as a de facto matter given the proximity and the economic connections between the opposing coasts of the Gulf, for instance, the Indian rupee was the standard currency throughout the Gulf until the mid 20th century.
That being said, as far as I'm aware, none of the Gulf sheikhdoms were ever regarded as part of the Raj de jure, and I don't seen any reason to regard them as such de facto. If nothing else, they were all sufficiently sparsely populated and economically unimportant at the time that there just wasn't any interest in the kind of direct administration that was exercised in India.
The terms of of these treaties rendered Trucial Oman into a kind of protectorate such that prior to the UAE's independence it can't possibly be regarded as sovereign but it was qualitatively different than the kind of administration that existed in greater India in terms of both the degree of domestic intrusiveness and of the cooperation of the sheikhdoms in maintaining the arrangement.
Sourcewise, have you might want to have a look at, for example, this short monograph Britain and the Gulf Shaikhdoms, 1820–1971: The Politics of Protection by James Onley.
To your second question: I've also wondered why the uae has so many immigrants and people that are from the indian subcontinent. Any answers?
Part of this has to do with the historical links and proximity between the two. There are, for example, historical communities of Arabs in India. But in a contemporary context, the vast majority of these migrants (numerically) are manual or unskilled laborers working in, for example, the massive construction industry or as taxi drivers. Educated Indians and Pakistanis also make up a very large proportion of the clerical work in the UAE, for example in IT.