この場合の「あなたのことを思い出した」は、次のように言うと良いでしょう。
ーI was just thinking of you.
「ちょうどあなたのことを考えていた」
ーYou came to mind the other day.
「この前、あなたのことが頭に浮かんだ」
例:
You came to mind the other day, so I wanted to write to you.
「この前あなたのことを思い出して、手紙を書きたくなりました」
ご参考まで!
I was thinking of you recently and wanted to reach out.
You crossed my mind the other day, and I thought I'd send you a quick message.
こんにちは!
ご質問ありがとうございます。
先のアンカーさんが回答されておりますので、ここでは他の例を挙げてみます。
I was thinking of you recently and wanted to reach out.
や、
You crossed my mind the other day, and I thought I'd send you a quick message.
とすると、「あなたのことをふと[思い出して](https://eikaiwa.dmm.com/uknow/questions/36510/)、連絡しようと思った。」となります。
役に立ちそうな単語とフレーズ
reach out 連絡しようとする
参考になれば幸いです。