Fetching all values from a doctype and storing in a single variable

Any suggestions for fetching all the mobile number of all customers from a doctype and storing it into a single variable. I only want to store that in a variable in client side .