Are you saying that the Supreme Court may base its decisions the laws of the individual states? If so I think you are far off of the mark.
The Supremes did indeed reference foreign laws when deciding the issue of execution of minors.
The issue here was defining "cruel and unusual" hence consulting numerous legal codes was clearly appropriate. How can one define "unusual" without determining what "usual" means?
The reference was "consider" or "consult" which is far different than "base".