Generally, Swiss banks only provide loans to people who reside in Switzerland and - in some cases - in Liechtenstein. Some banks make exceptions for cross-border workers (G permit).
If you are a German national residing in Switzerland, you must have a valid residence permit (C or B permit). In some cases an L permit (short-term residence) is accepted.
In addition to your residence status, Swiss lenders also require that you meet a number of other criteria before they approve your loan application. However, Swiss lenders do not obtain foreign credit reports or other data from foreign agencies when checking loan eligibility. That means they will not obtain a SCHUFA credit report from Germany.
Because Swiss lenders are not allowed to use data from foreing agencies, they tend to use stricter criteria when issuing loans to foreign nationals.
Two credit bureaus operate in Switzerland, namely the "Zentralstelle für Kreditinformationen" or "ZEK" and the "Informationsstelle für Kreditinformationen" or "IKO". These perform many of the same functions performed by the SCHUFA credit bureau in Germany.
More information:
Swiss personal loan comparison
Swiss personal loan calculator
ZEK Swiss credit bureau explained