If you the actual Arabic writing system (same association of symbols to sounds, at least for consonants), I think this would require explaining in terms of the fictional world. What is the connection between this world and ours, so that one of our writing systems came to be used there? If it is a fictional world separate from our own, then I would prefer to use a writing system *inspired* by Arabic (written right to left, calligraphic letter forms, etc.) without using the actual Arabic alphabet.

Grammatical gender in natural languages is a complex structure that evolves over time. Often the gender is determined by the phonological form of the word, rather than any obvious connection with biological sex. On the other hand, associations with the society's concept of male and female can also play a part. What a gender system arises from and how it works are choices to be made when developing the language; there is no single answer.